const {
  get,
  post,
  pureGet,
  upload,
  Put,
  Delete
} = require("./../utils/http");
const {
  contactUrlParams
} = require("./../utils/util");
//智能推荐 新
const newAiMatch = pram => {
  const query = contactUrlParams(pram)
  return post(`api/school/newAiMatch`,pram)
}
// 智能推荐数量
const matchCount = pram => {
  return post(`api/school/matchCount`,pram)
}
//设置使用当前志愿
const voluntaryTemplateUse=id=>{
  return post(`api/voluntary/template/use?id=${id}`)
}
// 添加志愿
const voluntaryTemplateAdd=params=>{
  return post(`api/voluntary/template/add`,params)
}
//我的志愿表
const voluntaryTemplatePage=params=>{
  const query=contactUrlParams(params)
  return get(`api/voluntary/template/page${query}`)
}
//志愿表详情
const voluntaryTemplateDetail=id=>{
  return get(`api/voluntary/template/${id}`)
}
//查询当前使用志愿
const voluntaryTemplateGetuse=params=>{
  return get(`api/voluntary/template/getUse`)
}
//获取城市配置
const voluntaryConfigCity=params=>{
  const provinceId=params.provinceId
  const firstSelect=params.firstSelect
  return get(`api/voluntary/config/city/${provinceId}?firstSelect=${firstSelect}`)
}
//删除志愿模板
const voluntaryTemplateDelete=id=>{
  return Delete(`api/voluntary/template/delete?id=`+id)
}
// 删除志愿详情
const voluntarydDelete=id=>{
  return Delete(`api/voluntary/delete?id=`+id)
}
//加入志愿
const voluntaryAdd = params => {
  const query=contactUrlParams(params)
  return post(`api/voluntary/add${query}`)
}
// 加入志愿-批量
const voluntaryBatchAdd = params => {
  return post(`api/voluntary/batchAdd`,params)
}
//排序-旧
const voluntaryUpdateSort=params=>{
  return post(`api/voluntary/updateSort`,params)
}
// 排序-新
const voluntaryUpdateSortList=params=>{
  return post(`api/voluntary/updateSortList`,params)
}
//智能填报
const viluntarySmartAdd=params=>{
  return post(`api/voluntary/smartAdd`,params)
}
//查询模板院校组
const voluntarySchoolGroup=id=>{
  return get(`api/voluntary/template/getSchoolGroup/${id}`)
}
// ai招生计划列表
const planVoluntaryPage = pram => {
  const query = contactUrlParams(pram)
  return post(`api/school/plan/voluntary/page`,pram)
}
// 智能排序
const voluntarySmartSort=tempId=>{
  return post(`api/voluntary/smartSort/${tempId}`)
}
// 志愿详情-复制
const voluntaryTemplateCopy=id=>{
  return post(`api/voluntary/template/copy?id=${id}`)
}
// 志愿-查询模板是否vip
const voluntaryTemplateIsVip=id=>{
  return get(`api/voluntary/template/isVip?id=${id}`)
}
// 志愿-合理解读
const analyseRational=id=>{
  return post(`api/voluntary/template/analyse/rational?id=${id}`)
}
// 志愿-批次解读
const analyseBatch=id=>{
  return post(`api/voluntary/template/analyse/batch?id=${id}`)
}
// 志愿-职业解读
const analyseEmployment=id=>{
  return post(`api/voluntary/template/analyse/employment?id=${id}`)
}
// 志愿详情-录取解读
const analyseRecruit=id=>{
  return post(`api/voluntary/template/analyse/recruit?id=${id}`)
}
// 智能填充
const voluntaryFill=id=>{
  return post(`api/voluntary/fill/?id=${id}`)
}
// 志愿历史录取
const special=params=>{
  const query = contactUrlParams(params)
  return get(`api/school/score/special/list${query}`)
}
module.exports = {
  newAiMatch,
  matchCount,
  special,
  voluntaryTemplateGetuse,
  voluntaryAdd,
  voluntaryTemplateUse,
  voluntaryTemplateAdd,
  voluntaryTemplatePage,
  voluntaryTemplateDetail,
  voluntaryConfigCity,
  voluntaryTemplateDelete,
  voluntarydDelete,
  voluntaryBatchAdd,
  voluntaryUpdateSort,
  voluntarySchoolGroup,
  viluntarySmartAdd,
  voluntaryUpdateSortList,
  planVoluntaryPage,
  voluntarySmartSort,
  voluntaryTemplateCopy,
  voluntaryTemplateIsVip,
  analyseRational,
  analyseBatch,
  analyseRecruit,
  analyseEmployment,
  voluntaryFill
}